package com.wxapp.sale.service.controller.client;

import com.wxapp.common.constant.base.IBaseController;
import com.wxapp.common.constant.pojo.vm.ResultVm;
import com.wxapp.sale.api.pojo.vm.goodType.PGoodsTypeDetailVm;
import com.wxapp.sale.service.service.GoodsTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * @author lgl
 * @Description 商品类型
 * @Datetime 2022/6/22 14:25
 * @Modified By
 */
@RestController
@Tag(name = "商品类型")
@RequestMapping("/client/goods/type")
@RequiredArgsConstructor
public class GoodsTypeClientController extends IBaseController {
    private final GoodsTypeService goodsTypeService;

    @GetMapping("list")
    @Operation(summary ="获取类型list")
    public ResultVm<List<PGoodsTypeDetailVm>> goodTypeList(@RequestParam(value = "pid",required = false) String pid) {
        return goodsTypeService.goodTypeList(pid);
    }
}
